import {createRequire} from 'module'

const require = createRequire(import.meta.url)
const express = require('express')
const feedbackRouter = express.Router()
/**
 * @api {get} /feedback 反馈首页
 * @apiGroup feedback
 * @apiParam {string} name 用户
 */
feedbackRouter.get('/',function(req, res) {
    res.writeHead(200, {"Content-type": "text/html;charset=utf-8"})
    res.write("<p>反馈页面</p>")
    res.end()
})
/**
 * @api {get} /feedback/insert insert
 * @apiGroup feedback
 * @apiParam {string} name 用户
 */
feedbackRouter.get('/insert',function(req, res) {
    res.writeHead(200, {"Content-type": "text/html;charset=utf-8"})
    res.write("<p>插入反馈</p>")
    res.end()
})
/**
 * @api {get} /feedback/delete delete
 * @apiGroup feedback
 * @apiParam {string} name 用户
 */
feedbackRouter.get('/delete',function(req, res) {
    res.writeHead(200, {"Content-type": "text/html;charset=utf-8"})
    res.write("<p>删除反馈</p>")
    res.end()
})
/**
 * @api {get} /feedback/update update
 * @apiGroup feedback
 * @apiParam {string} name 用户
 */
feedbackRouter.get('/update',function(req, res) {
    res.writeHead(200, {"Content-type": "text/html;charset=utf-8"})
    res.write("<p>修改反馈</p>")
    res.end()
})
/**
 * @api {get} /feedback/query query
 * @apiGroup feedback
 * @apiParam {string} name 用户
 */
feedbackRouter.get('/query',function(req, res) {
    res.writeHead(200, {"Content-type": "text/html;charset=utf-8"})
    res.write("<p>查询反馈</p>")
    res.end()
})
export const feedback = feedbackRouter